import React from "react";
import { useNavigate } from "react-router-dom";
import { MyNavBar } from "../myNavBar";
import style from "./style.module.scss";
import emptyImg from "../../assets/images/image/hdpi/no_message.png";

interface propsType {
  path: string;
  title: string;
  desc: string;
}

export const EmptyPage: React.FC<propsType> = ({ title, desc, path }) => {
  const navigate = useNavigate();
  return (
    <div>
      <div className={style.navbar}>
        <MyNavBar
          title={title}
          style={{
            backgroundColor: "#fff",
            height: "46px",
            fontWeight: "none",
          }}
          onClickLeft={() => {
            navigate(path);
          }}
        />
      </div>
      <div className={style.content}>
        <img src={emptyImg} alt="" className={style.emptyImg} />
        <div className={style.emptyDesc}>{desc}</div>
      </div>
    </div>
  );
};

export default EmptyPage;
